from pydantic import BaseModel, Field
import typing as T


class EmbeddingSearchParamsDTO(BaseModel):
    knowledgeBaseId: T.Optional[int] = Field(
        default=None, description="知识库id【必须在请求头中填】"
    )
    query: str = Field(description="查询描述")
    top_n: T.Optional[int] = Field(default=1, description="要返回的数量【默认是1】")
    type: T.Literal["text", "image"] = Field(
        default="text",
        description="要返回的数据类型，可选值【'text' | 'image'】 【默认是'text'】",
    )
    returnId: T.Optional[bool] = Field(
        default=False, description="是否返回索引【默认是False】"
    )
